/// @file
/// @author Chelsey Batchelor <vadedeyes@gmail.com>
/// @author Abraham Escamilla <abraham.escamilla@live.com>
/// @author Curtis Hollibaugh <curtis.hollibaugh@gmail.com>
/// @copyright Copyright 2014 Chelsey Batchelor <vadedeyes@gmail.com>
/// @copyright Copyright 2014 Abraham Escamilla <abraham.escamilla@live.com>
/// @copyright Copyright 2014 Curtis Hollibaugh <curtis.hollibaugh@gmail.com>
/// Contains definitions for the TrayIcon class.

#include "trayicon.hpp"

using std::string;

TrayIcon::TrayIcon() noexcept
:	statusIcon{Gtk::CreateStatusIcon()} {
	Gtk::SetIsVisible(statusIcon, false);
}

TrayIcon::TrayIcon(const string& iconPath) noexcept
:	statusIcon{Gtk::CreateStatusIcon(iconPath.c_str())} {
	Gtk::SetIsVisible(statusIcon, false);
}

TrayIcon::~TrayIcon() noexcept {
	Gtk::DestroyStatusIcon(statusIcon);
}

void TrayIcon::Hide() noexcept {
	Gtk::SetIsVisible(statusIcon, false);
}

bool TrayIcon::IsVisible() noexcept {
	return Gtk::GetIsVisible(statusIcon);
}

void TrayIcon::Show() noexcept {
	Gtk::SetIsVisible(statusIcon, true);
}
